import java.util.List;

public class Test {

    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();

        binaryTree.levelOrder(root);
        System.out.println();

        List<List<Character>> ret = binaryTree.levelOrder2(root);
        System.out.println(ret);

        System.out.println(binaryTree.isCompleteTree(root));
    }

    public static void main2(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();

        binaryTree.getLeafNodeCount(root);
        System.out.println(BinaryTree.leafSize);

        System.out.println(binaryTree.getLeafNodeCount2(root));

        System.out.println(binaryTree.getKLevelNodeCount(root, 4));

        System.out.println(binaryTree.getHeight(root));

        BinaryTree.TreeNode node = binaryTree.find(root, 'A');
        System.out.println(node.val);
    }

    public static void main1(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();

        binaryTree.preOrder(root);
        System.out.println();
        binaryTree.preorderTraversal(root);
        System.out.println(binaryTree.tmp);

        binaryTree.postOrder(root);
        System.out.println();

        binaryTree.inOrder(root);
        System.out.println();
        List<Character> ret = binaryTree.inorderTraversal(root);
        System.out.println(ret);

        binaryTree.size(root);
        System.out.println(BinaryTree.nodeSize);

        System.out.println(binaryTree.size2(root));
    }
}
